﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace T19ShotBlock.BaseClass
{
    public class RandomHelper
    {
        public static Random globalRandomGenerator= GenerateNewRandomGenerator();

        public static Random GenerateNewRandomGenerator()
        {
            globalRandomGenerator = new Random((int)DateTime.Now.Ticks);
            return globalRandomGenerator;
        }

        public static int GetRandomInt()
        {
            return globalRandomGenerator.Next(10);
        }

        public static int GetRandomInt(int max)
        {
            return globalRandomGenerator.Next(max);
        }

        public static int GetRandomInt(int min,int max)
        {
            return globalRandomGenerator.Next(max-min)+min;
        }

        public static double GetRandomInt(double min, double max)
        {
            return globalRandomGenerator.NextDouble()*(max - min) + min;
        }
    }
}
